const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    entry: {
        index: ["./src/js/index.js", "./src/scss/index.scss", "./src/scss/iconfont.scss"],
        gamelist: ["./src/js/gamelist.js", "./src/scss/gamelist.scss", "./src/scss/iconfont.scss"],
        gamepage: ["./src/js/gamepage.js", "./src/scss/gamepage.scss", "./src/scss/iconfont.scss"],
        list: ["./src/js/list.js", "./src/scss/list.scss", "./src/scss/iconfont.scss"],
        personal: ["./src/js/personal.js", "./src/scss/personal.scss", "./src/scss/iconfont.scss"],
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: "./src/html/index.html",
            filename: "index.html",
            chunks: ["index"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/gamelist.html",
            filename: "gamelist.html",
            chunks: ["gamelist"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/gamepage.html",
            filename: "gamepage.html",
            chunks: ["gamepage"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/list.html",
            filename: "list.html",
            chunks: ["list"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/personal.html",
            filename: "personal.html",
            chunks: ["personal"]
        }),
    ]
}
